package org.creavi.engine.util;

import java.util.ArrayList;
import java.util.StringTokenizer;

public class StringRecord {
	ArrayList<String> tokens = new ArrayList<String>();

	public StringRecord(String linea) {
		StringTokenizer st = new StringTokenizer(linea, " ");
		while (st.hasMoreTokens()) {
			tokens.add(st.nextToken());
		}
	}

	public int getInt(int idx) {
		return Integer.parseInt(tokens.get(idx));
	}

	public float getFloat(int idx) {
		return Float.parseFloat(tokens.get(idx));
	}

	public String getString(int idx) {
		return tokens.get(idx);
	}
}
